<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>定宽块状元素</title>
    <style>
        div{
            width: 400px;
            height: 200px;
            border : red 2px solid;
            margin: 20px auto;
        }
    </style>
</head>
<body>
    <div>我是宽度固定的块状元素</div>
</body>
</html>